<template>
	<view class="container">
		<uni-section title="食物列表展示" type="line">
			<navigator url="../commentdetail/commentdetail">
			<uni-list>
				<uni-list-item v-for="item in haochi" :title="item.comment"></uni-list-item>
			</uni-list>
			</navigator>
		</uni-section>

	</view>
</template>

<script>
	export default {
		data() {
			return {
				haochi: {}
			}
		},
		methods: {

		},
		onLoad() {
			uni.request({
				url: 'http://localhost:8090/foodapp/comment/list',
				method: 'post',
				success: res => {
					if (res.data.success) {
						this.haochi = res.data.list
					}
				},
				fail: () => {},
				complete: () => {}
			});
		}
	}
</script>

<style>
	
</style>
